<template>
  <div class="page-header mb-md">
    <div class="left">
      <h1 class="page-title">{{ title }}</h1>
      <p v-if="subtitle" class="page-subtitle text-gray-500">{{ subtitle }}</p>
    </div>
    <div class="actions">
      <slot name="actions"></slot>
    </div>
  </div>
</template>

<script setup lang="ts">
defineOptions({
  name: 'PageHeader'
})

defineProps({
  title: {
    type: String,
    required: true
  },
  subtitle: {
    type: String,
    default: ''
  }
})
</script>

<style scoped lang="scss">
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  
  .page-title {
    font-size: 24px;
    font-weight: 600;
    color: #303133;
    margin: 0;
    line-height: 1.4;
  }
  
  .page-subtitle {
    margin: 4px 0 0 0;
    font-size: 14px;
  }
}
</style>
